home *** CD-ROM | disk | FTP | other *** search
/ Fifty: Elektronik / FIFTY Elektronik (PS_Computer_Vertrieb).iso / ps8 / fty1026 / lasidss.hlp < prev    next >
Encoding:
Text File  |  1994-01-14  |  14.8 KB  |  446 lines

  1. ≡≡
  2.  
  3. Introduction
  4.  
  5.  Introduction
  6.  
  7.  
  8.   The following information is supplied for use by anyone who may want to
  9.   access the data structure of LASI drawings. LASI data files have two
  10.   representations, internal and external. The information regarding
  11.   internal data files is subject to change, and, be warned, any programs
  12.   using it may need to be modified in the future. External format will
  13.   remain consistent, or at most a conversion program will be supplied if
  14.   modifications are made.
  15.  
  16.   Internal (DBD, BP4 and CL4) data files are optimized for fast access and
  17.   are used by the program itself as it executes.
  18.  
  19.   Utilities may be written to operate on these files, but it may be
  20.   somewhat more difficult due to the cell pointers used internally.
  21.  
  22.   External (TLC) files are ASCII files that contain cell references by name
  23.   not pointer and data for objects in readable (and editable) ASCII.
  24.   Transfer of cells between drawings can be more easily accomplished and
  25.   utility programs can be more easily written when the external form is
  26.   used.
  27.  
  28. Internal Data Files
  29.  
  30.  Internal File Types
  31.  
  32.   A drawing consists of Drawing Basic Data files (.DBD extension) and a
  33.   number of cell files (.BP4 and .CL4). The DBD files are the CELLS4.DBD,
  34.   CONSTS4.DBD and FORM.DBD files. These are ASCII sequential files.
  35.   CELLS4.DBD contains the information regarding the cells associated with a
  36.   drawing. CONSTS4.DBD contains the preserved constants that set up a
  37.   drawing, i.e. window sizes, scales, etc. FORM.DBD contains permanent
  38.   setup information for a drawing.
  39.  
  40.   There is also a TXT.DBD file that is binary and contains the text font
  41.   patterns. This has to be edited using the MAKETXT.EXE program. This file
  42.   may have an arbitrary name. For more information on this file read Text
  43.   Generation in the main LASI help.
  44.  
  45.  CELLS4.DBD file
  46.  
  47.   This is an ASCII sequential file consisting of the number of cells
  48.   followed by 10-entry records for each cell.
  49.  
  50.  
  51.   File Format:
  52.  
  53.   Number of Cells<nl>
  54.  
  55.   Cell 1 Record:
  56.       Entry:
  57.           1= Name of cell<nl>
  58.           2= Rank of cell (1-15)<sp> (see below)
  59.           3= Left boundary of cell in basic units<sp>
  60.           4= Bottom boundary of cell in basic units<sp>
  61.           5= Right boundary of cell in basic units<sp>
  62.           6= Top boundary of cell in basic units<sp>
  63.           7= Number of boxes in cell<sp>
  64.           8= Number of poly in cell<sp>
  65.           9= Number of vertices in cell<sp>
  66.           10= Number of cells in cell<nl>
  67.  
  68.   Cell 2 Record: etc.,etc.,
  69.  
  70.   Notes:
  71.  
  72.     1. Cells may be in any order. A cell with rank other than 1-15 is
  73.        uneditable.
  74.  
  75.     2. Pooled cells are marked with the 256-bit (100 hex) set to 1. Since
  76.        pooled cells may have only a rank of 1, this number will always be
  77.        257 for a pooled cell.
  78.  
  79.  CONSTS4.DBD File
  80.  
  81.   The CONSTS4.DBD file is a nonessential file; if absent, it defaults to a
  82.   standard configuration when the LASI program is started. When LASI is
  83.   closed, a CONSTS4.DBD with the present configuration is written.
  84.  
  85.   It is possible for future versions of LASI to have different CONSTS4.DBD
  86.   files, that is, compatibility is not guaranteed. In such case, deleting
  87.   an old CONSTS4.DBD file and defaulting to the standard configuration at
  88.   first will be necessary.
  89.  
  90.   It is expected that the first 3 entries (the version, the scale factor,
  91.   and the physical units) will be unchanged, since they provide information
  92.   to conversion utilities.
  93.  
  94.   File Format:
  95.  
  96.   The present CONSTS4.DBD file contains the following sequential ASCII data
  97.   readable by a BASIC INPUT or a C scanf() function:
  98.  
  99.       The Version of LASI under which the file was made
  100.       The Number of Basic Units per Physical Unit
  101.       The Name of the Physical Unit
  102.  
  103.       A 64 character Color String with each character indicating the color
  104.       of the layer (r=red etc.)
  105.  
  106.       64 FILL numbers indicating which fills are to be used on the
  107.       corresponding layer.
  108.  
  109.       64 DASH numbers indicating which dashes are to be used on the
  110.       corresponding layer.
  111.  
  112.       The Number of Working Grids
  113.       All 10 Working Grids in basic units
  114.  
  115.       For Each of 15 Ranks:
  116.         The Working Grid Number
  117.         The Dot Grid
  118.         The Grid Visibility Flag
  119.         The Window Width, in basic units
  120.         The Window Center X and Y Positions, in basic units
  121.  
  122.   Integer Constants:
  123.  
  124.       Layer Number for ADD
  125.       Default Path Width
  126.       Text Layer for ADD
  127.       Default Text Size
  128.       Drawing Resolution Number
  129.       Number of Arc Segments
  130.       Double Click Ticks
  131.       Position Report Ticks
  132.       Sort Backup Time
  133.       Octo Flag
  134.       Cell Outline Name Flag
  135.       Path Center Line Flag
  136.       Text Reference Flag
  137.       Distance Marker Flag
  138.       Fill with "0" to 16 entries
  139.  
  140.   Float Constants:
  141.  
  142.       The Maximum Number of Saved Windows (9)
  143.       All Saved Window Widths, X Centers and Y Centers
  144.       Text Spacing Ratio
  145.       PSIZ Number
  146.       Rotation Angle
  147.       OVSZ Distance
  148.       R Sheet Resistance
  149.       C per Square
  150.       R End Correction
  151.       X Mickey Multiplier
  152.       Y Mickey Multiplier
  153.       Fill with "0" to 16 entries
  154.  
  155.   String Constants:
  156.  
  157.       For Each of 15 Ranks:
  158.         VIEW Layers
  159.         OPEN Layers
  160.  
  161.       Kind of Object to be ADDed ("B","P", or Name of Cell)
  162.       Arc Add Direction (cw, ccw)
  163.       Fill with "reserved" to 8 entries
  164.       "end" (marker for short file read check)
  165.  
  166.  Cell Data Files
  167.  
  168.   There are two kinds of Cell Data Files, BP4 files and CL4 files. BP4
  169.   files contain the boxes, poly and vertices of a cell. CL4 files contain
  170.   the cells within the cell. All cells have BP4 files, but only if a cell's
  171.   rank > 1 will one have a CL4  file.
  172.  
  173.   Both files are binary files. Each block of data records is read until a
  174.   zero is encountered in the first record entry. (Actually a whole zero
  175.   record is written to the files.) The box data records are placed first in
  176.   a BP4 file, followed by the path data records, and finally by the vertex
  177.   data records. This data structure allows any unknown cell file to be read
  178.   into the drawing system without prior knowledge of the number or type of
  179.   records.
  180.  
  181.   Notes:
  182.  
  183.     1. In records, separator characters will be shown in < >.
  184.        <nl>= newline (<cr><lf>)
  185.        <sp>= space
  186.  
  187.     2. Basic Units are the smallest unit of the 16-bit integers in which a
  188.        drawing is maintained in the LASI data. Physical Units are the units
  189.        in which you do a layout drawing (mil, um, etc.) These are related
  190.        to the basic units by the Scale Factor.
  191.  
  192.     3. Version numbers may contain alpha characters but the number must
  193.        always begin with a numeric character.
  194.  
  195.  Box Data Structure
  196.  
  197.   Box data is kept in an array of structures with 5 integer members.
  198.  
  199.       Box Record Entries:
  200.  
  201.       0 = Bits 0-7 , Layer Number (1-64)
  202.           Bits 8-11 , Active Side Program Flags (Cleared in File)
  203.           Bits 12-13 , Unused Flags (Cleared in File)
  204.           Bit 14, Program Out of Window Flag (Cleared in File)
  205.           Bit 15, Unused (Cleared in File)
  206.  
  207.                         active side
  208.                           | | | |
  209.                   x x x x|x x x x|x x x x|x x x x
  210.                     |             | | | | | | | |
  211.                     owb           <--- layer --->
  212.        (out of window bit)
  213.  
  214.       1= Lower Left Corner X Position in basic units
  215.  
  216.       2= Lower Left Corner Y Position
  217.  
  218.       3= Upper Right Corner X Position
  219.  
  220.       4= Upper Right Corner Y Position
  221.  
  222.  Path Data Structure
  223.  
  224.   Path data is kept in an array of structures with 3 integer members.
  225.  
  226.   A variation in the normal path data structure is used in Vers 4 to store
  227.   path entities that expand as written text. The path record contains a
  228.   marker bit and orientation bits. The first vertex record is a normal
  229.   vertex record which locates the text in the drawing, however, the
  230.   subsequent records contain ASCII character codes as explained below.
  231.  
  232.   Path Record Entries:
  233.  
  234.       0 = Bits 0-7, Layer of Path (1-64)
  235.           Bit 8, Path has 1 or more Active Vertices Flag (Cleared in
  236.           File)
  237.  
  238.           Bits 9-15,
  239.  
  240.           If Normal Path:
  241.               Program Flags (Cleared in File)
  242.  
  243.           else if Path Text:
  244.               Bits 9-11, Orientation Bits (same as Cells)
  245.               Bit 15 set indicates Path Text Record
  246.  
  247.                      0x3800     0x100
  248.                       oren     active
  249.                       | | |     |
  250.                   x x x x|x x x x|x x x x|x x x x
  251.                   | |       | |   | | | | | | | |
  252.                   | owb     nop   <--- layer --->
  253.                   text                0xFF
  254.  
  255.       1= If Normal Path:
  256.           Width of Path in basic units (0 indicates Poly)
  257.  
  258.       else if Path Text:
  259.           Size of Path Text (size of character field)
  260.  
  261.       2= Pointer to First Vertex of path in vertex array
  262.  
  263.  Vertex Data Structure
  264.  
  265.   Vertex data is kept in a array of structures with 4 integer members.
  266.  
  267.   Vertex Record Entries:
  268.  
  269.       0 = Bits 0-12, Number of Path to which Vertex belongs
  270.           Bit 13, Active Vertex Bit (Cleared in File)
  271.           Bits 14-15,
  272.  
  273.           If Normal Paths:
  274.               Program Flags (Cleared in File)
  275.  
  276.           else if Path Text:
  277.               Bit 15 set indicates Path Text Character Record
  278.  
  279.  
  280.                  0x4000
  281.                  active
  282.                     |
  283.                   x x x x|x x x x|x x x x|x x x x
  284.                   |   | | | | | | | | | | | | | |
  285.                   |    <----- path number ----->
  286.                   text vtx       0x3FFF
  287.                   0x8000
  288.  
  289.       1= If Normal Path:
  290.           X Position of Vertex in basic units
  291.  
  292.       else if Path Text:
  293.           Two bytes ASCII Character Code
  294.  
  295.       2= If Normal Path:
  296.           Y Position of Vertex in basic units
  297.  
  298.       else if Path Text:
  299.           Two bytes ASCII Character Code
  300.  
  301.       3= Pointer to next Vertex in Vertex Array
  302.           (Zero for the Last Vertex of a Path)
  303.  
  304.  Cell Data Structure
  305.  
  306.   Cell data is kept in a 2-dimensional array of structures of 3 integer
  307.   members. The added dimension is the depth of cell nesting, so that a
  308.   parent cell remans loaded while lesser cells are loaded and drawn. In a
  309.   CL4 file the nesting level is unnecessary, and the data is kept in a
  310.   binary file following the same rules as the BP4 file but with the .CL4
  311.   file extension.
  312.  
  313.   Cell Record Entries:
  314.  
  315.       0 = Bits 0-9, Number of cell in CELLS4.DBD list
  316.           Bit 10, Active Cell Flag (Cleared in File)
  317.           Bits 11-13, Orientation (See Below)
  318.           Bit 14, Draw Outline Flag
  319.           Bit 15, Extended Flag (reserved for cell arrays)
  320.  
  321.                  outl orien active
  322.                     | | | | |
  323.                   x x x x|x x x x|x x x x|x x x x
  324.                   |           | | | | | | | | | |
  325.                   |           <--- ref number -->
  326.                   |
  327.           (reserved for cell array extended record)
  328.  
  329.       1= X Position of Cell in basic units
  330.  
  331.       2= Y Position of Cell in basic units
  332.  
  333.       Orientation:
  334.           Bit 13, Cell is flipped in Y and then rotated
  335.           Bits 12 and 11,
  336.           0= no rotation
  337.           1= 90 deg ccw rotation
  338.           2= 180 deg ccw rotation
  339.           3= 270 deg ccw rotation
  340.  
  341. External Data Files
  342.  
  343.  Transportable Cells
  344.  
  345.   The external data file representation condenses the CELLS4.DBD, BP4 and
  346.   CL4 files into one representation, thus making cells transportable. The
  347.   files have the extension .TLC (Transportable LASI Cell). TLC files can be
  348.   easily read by BASIC, PASCAL, or C.
  349.  
  350.   Each Cell has its own TLC file. This means that a TLC file may not really
  351.   contain all the information to construct a cell if it has lesser cells
  352.   within it. In that case, the TLC files for the lesser cells will have to
  353.   be present for conversion to internal form. When converting to external
  354.   form, the program TLCOUT.EXE automatically makes the TLC files for lesser
  355.   cells if they are not present in the MS-DOS directory. When conversion
  356.   from external to internal is being done, the lesser cells are also made
  357.   in internal form  by the TLCIN.EXE conversion program if not already
  358.   present.
  359.  
  360.  
  361.   Important:  RECORDS may be in ANY ORDER in a TLC file.
  362.  
  363.  Records in Detail
  364.  
  365.   Header Record:      <nl>= carriage return + linefeed    <sp>= space
  366.  
  367.       1= "=H" (literal)<nl>
  368.       2= Name of Cell (DOS file name)<nl>
  369.       3= Version of LASI (literal)<nl>
  370.       4= Version of TLC (literal)<nl>
  371.       5= Basic Units per Physical Unit<nl>
  372.       6= Name of Physical Unit (literal)<nl>
  373.       7= Date of Cell Conversion (literal)<nl>
  374.       8= Time of Cell Conversion (literal)<nl>
  375.       9= Rank of Cell<sp>
  376.       10= Left Outline Boundary in basic units<sp>
  377.       11= Bottom Boundary in basic units<sp>
  378.       12= Right Boundary in basic units<sp>
  379.       13= Top Boundary in basic units<nl>
  380.       14= Number of Boxes<sp>
  381.       15= Number of Paths<sp>
  382.       16= Number of Vertices<sp>
  383.       17= Number of Cells<nl>
  384.  
  385.       Note:  Versions must begin with a numeric character
  386.  
  387.   Cell Record Entries:
  388.  
  389.       1= "=C" (literal)<nl>
  390.       2= Name of Lesser Cell<nl>
  391.       3= Orientation (see below)<sp>
  392.       4= X Position in basic units<sp>
  393.       5= Y Position in basic units<sp>
  394.       6= reserved (presently zero)<nl>
  395.  
  396.       Property Number: (0-15)
  397.         16 bit integer, all bits 0 except:
  398.  
  399.           Bit 4,
  400.             0= draw cell fully
  401.             1= draw cell outline
  402.  
  403.         Orientation:
  404.           Bit 3,
  405.             0= cell not flipped
  406.             1= cell is flipped in Y before rotation
  407.  
  408.           Bits 2 and 1,
  409.             0,0 = no rotation
  410.             0,1 = 90 deg rotation CCW
  411.             1,0 = 180 deg rotation CCW
  412.             1,1 = 270 deg rotation CCW
  413.  
  414.   Box Record Entries:
  415.  
  416.       1= "=B" (literal)<nl>
  417.       2= Layer of Box<sp>
  418.       3= X of Lower Left Corner in basic units<sp>
  419.       4= Y of Lower Left Corner in basic units<sp>
  420.       5= X of Upper Right Corner in basic units<sp>
  421.       6= Y of Upper Right Corner in basic units<nl>
  422.  
  423.   Path/Poly Record Entries:
  424.  
  425.       1= "=P" (literal)<nl>
  426.       2= Layer of Path/Poly<sp>
  427.       3= Width in basic units<sp>
  428.       4= No. of Vertices in path/poly<nl>
  429.       5= Vertices in basic units in the form:
  430.       X1<sp>Y1<sp>X2<sp>Y2<sp>X3<sp>Y3<sp>X4<sp>Y4<sp>X5<sp>Y5<nl>
  431.       .......Xn-1<sp>Yn-1<sp>Xn<sp>Yn<nl>
  432.  
  433.       (Groups of 5 coordinates separated by <sp> ended by <nl>,
  434.       always with <nl> after Last Coordinate Pair)
  435.  
  436.   Text Record Entries:
  437.  
  438.       1= "=T" (literal)<nl>
  439.       2= Layer of Text<sp>
  440.       3= Size in basic units<sp>
  441.       4= No. of Vertices used by text (includes Ref Point)<sp>
  442.       5= Orientation 0-7 (same as cells)<nl>
  443.       6= X Ref Point in basic units<sp>
  444.       7= Y Ref Point in basic units<nl>
  445.       8= ASCII character text string<nl> (u/l case, up to 40 characters)
  446.